<template>
    <div>
        case1:<input v-model="str1" type="text">
        <hr>
        case2:<input v-model="str2" type="text">
    </div>

</template>

<script setup lang="ts">
    import {ref,watch} from "vue"
    let str1 = ref<string>("小满")
    let str2 = ref<string>("大满")
    watch(str1,(newVal,oldVal)=>{
        console.log(newVal,oldVal)
    })
</script>

<style scoped>

</style>
